﻿Imports Publics

 

Public Class cls_VT_HDXuat_ChiTiet


    Private _DVT As String
    Public Property DVT() As String
        Get
            Return _DVT
        End Get
        Set(ByVal value As String)
            _DVT = value
        End Set
    End Property


    Private _SoSeri As String
    Public Property SoSeri() As String
        Get
            Return _SoSeri
        End Get
        Set(ByVal value As String)
            _SoSeri = value
        End Set
    End Property

    Private _SoHDTC As String
    Public Property SoHDTC() As String
        Get
            Return _SoHDTC
        End Get
        Set(ByVal value As String)
            _SoHDTC = value
        End Set
    End Property


    Private _DonGia As Decimal?
    Public Property DonGia() As Decimal?
        Get
            Return _DonGia
        End Get
        Set(ByVal value As Decimal?)
            _DonGia = value
        End Set
    End Property

    Private _GiaVon As Decimal?
    Public Property GiaVon() As Decimal?
        Get
            Return _GiaVon
        End Get
        Set(ByVal value As Decimal?)
            _GiaVon = value
        End Set
    End Property

    Private _SoLuong As Decimal?
    Public Property SoLuong() As Decimal?
        Get
            Return _SoLuong
        End Get
        Set(ByVal value As Decimal?)
            _SoLuong = value
        End Set
    End Property

    Private _TienHang As Decimal?
    Public Property TienHang() As Decimal?
        Get
            Return _TienHang
        End Get
        Set(ByVal value As Decimal?)
            _TienHang = value
        End Set
    End Property

    Private _TienGiaVon As Decimal?
    Public Property TienGiaVon() As Decimal?
        Get
            Return _TienGiaVon
        End Get
        Set(ByVal value As Decimal?)
            _TienGiaVon = value
        End Set
    End Property

    Private _TileCK As Decimal?
    Public Property TileCK() As Decimal?
        Get
            Return _TileCK
        End Get
        Set(ByVal value As Decimal?)
            _TileCK = value
        End Set
    End Property

    Private _TienCK As Decimal?
    Public Property TienCK() As Decimal?
        Get
            Return _TienCK
        End Get
        Set(ByVal value As Decimal?)
            _TienCK = value
        End Set
    End Property

    Private _ThueSuat As Decimal?
    Public Property ThueSuat() As Decimal?
        Get
            Return _ThueSuat
        End Get
        Set(ByVal value As Decimal?)
            _ThueSuat = value
        End Set
    End Property

    Private _TienThue As Decimal?
    Public Property TienThue() As Decimal?
        Get
            Return _TienThue
        End Get
        Set(ByVal value As Decimal?)
            _TienThue = value
        End Set
    End Property

    Private _ThanhTien As Decimal?
    Public Property ThanhTien() As Decimal?
        Get
            Return _ThanhTien
        End Get
        Set(ByVal value As Decimal?)
            _ThanhTien = value
        End Set
    End Property

    Private _TienThanhToan As Decimal?
    Public Property TienThanhToan() As Decimal?
        Get
            Return _TienThanhToan
        End Get
        Set(ByVal value As Decimal?)
            _TienThanhToan = value
        End Set
    End Property

    Private _STT As Integer
    Public Property STT() As Integer
        Get
            Return _STT
        End Get
        Set(ByVal value As Integer)
            _STT = value
        End Set
    End Property

    Private _ID As String
    Public Property ID() As String
        Get
            Return _ID
        End Get
        Set(ByVal value As String)
            _ID = value
        End Set
    End Property

    Private _IDSanPham As String
    Public Property IDSanPham() As String
        Get
            Return _IDSanPham
        End Get
        Set(ByVal value As String)
            _IDSanPham = value
        End Set
    End Property

    Private _IDHDXuat As String
    Public Property IDHDXuat() As String
        Get
            Return _IDHDXuat
        End Get
        Set(ByVal value As String)
            _IDHDXuat = value
        End Set
    End Property

    Private _IDKho As String
    Public Property IDKho() As String
        Get
            Return _IDKho
        End Get
        Set(ByVal value As String)
            _IDKho = value
        End Set
    End Property

    Private _MaKho As String
    Public Property MaKho() As String
        Get
            Return _MaKho
        End Get
        Set(ByVal value As String)
            _MaKho = value
        End Set
    End Property

    Private _MaSanPham As String
    Public Property MaSanPham() As String
        Get
            Return _MaSanPham
        End Get
        Set(ByVal value As String)
            _MaSanPham = value
        End Set
    End Property

    Private _TenSanPham As String
    Public Property TenSanPham() As String
        Get
            Return _TenSanPham
        End Get
        Set(ByVal value As String)
            _TenSanPham = value
        End Set
    End Property


    Private _DM_Kho As DM_Kho
    Public Property DM_Kho() As DM_Kho
        Get
            Return _DM_Kho
        End Get
        Set(ByVal value As DM_Kho)
            _DM_Kho = value
        End Set
    End Property

    '-------------------------------------------------------------
    'Su dung cho dieu chuyen noi bo
    Private _IDKhoTu As String
    Public Property IDKhoTu() As String
        Get
            Return _IDKhoTu
        End Get
        Set(ByVal value As String)
            _IDKhoTu = value
        End Set
    End Property

    Private _MaKhoTu As String
    Public Property MaKhoTu() As String
        Get
            Return _MaKhoTu
        End Get
        Set(ByVal value As String)
            _MaKhoTu = value
        End Set
    End Property

    Private _IDKhoDen As String
    Public Property IDKhoDen() As String
        Get
            Return _IDKhoDen
        End Get
        Set(ByVal value As String)
            _IDKhoDen = value
        End Set
    End Property

    Private _MaKhoDen As String
    Public Property MaKhoDen() As String
        Get
            Return _MaKhoDen
        End Get
        Set(ByVal value As String)
            _MaKhoDen = value
        End Set
    End Property

    Public Sub CopyTo_HDXuat_ChiTiet(ByRef obj As VT_HDXuat_ChiTiet)
        With obj
            '
            .DonGia = Me.DonGia
            .SoLuong = Me.SoLuong
            .ThanhTien = Me.ThanhTien
            .TienHang = Me.TienHang
            .TiLeCK = Me.TileCK
            .TienCK = Me.TienCK
            .TienCK = Me.TienCK
            .ThueSuat = Me.ThueSuat
            .TienThue = Me.TienThue
            .ThanhTien = Me.ThanhTien

            .GiaVon = Me.GiaVon
            .TienGiaVon = Me.GiaVon * Me.SoLuong
            '.IDSanPham = Me.IDSanPham
            .IDKho = Me.IDKho
            .STT = Me.STT

            .InUsed = True
            .EditedOn = dbTV.GetDateTimeServer


        End With
    End Sub

End Class

Public Class clsViewPhieuNhapXuat

    Private _IDHoaDon As String
    Public Property IDHoaDon() As String
        Get
            Return _IDHoaDon
        End Get
        Set(ByVal value As String)
            _IDHoaDon = value
        End Set
    End Property

    Private _SoCT As String
    Public Property SoCT() As String
        Get
            Return _SoCT
        End Get
        Set(ByVal value As String)
            _SoCT = value
        End Set
    End Property

    Private _SoHDTC As String
    Public Property SoHDTC() As String
        Get
            Return _SoHDTC
        End Get
        Set(ByVal value As String)
            _SoHDTC = value
        End Set
    End Property

    Private _NgayCT As String
    Public Property NgayCT() As String
        Get
            Return _NgayCT
        End Get
        Set(ByVal value As String)
            _NgayCT = value
        End Set
    End Property

    Private _MaKho As String
    Public Property MaKho() As String
        Get
            Return _MaKho
        End Get
        Set(ByVal value As String)
            _MaKho = value
        End Set
    End Property

    Private _MaKH As String
    Public Property MaKH() As String
        Get
            Return _MaKH
        End Get
        Set(ByVal value As String)
            _MaKH = value
        End Set
    End Property

    Private _TenKH As String
    Public Property TenKH() As String
        Get
            Return _TenKH
        End Get
        Set(ByVal value As String)
            _TenKH = value
        End Set
    End Property

    Private _TCNX As String
    Public Property TCNX() As String
        Get
            Return _TCNX
        End Get
        Set(ByVal value As String)
            _TCNX = value
        End Set
    End Property

    Private _IdHTTT As String
    Public Property IdHTTT() As String
        Get
            Return _IdHTTT
        End Get
        Set(ByVal value As String)
            _IdHTTT = value
        End Set
    End Property

    Private _MaHTTT As String
    Public Property MaHTTT() As String
        Get
            Return _MaHTTT
        End Get
        Set(ByVal value As String)
            _MaHTTT = value
        End Set
    End Property

    Private _SoLuong As Decimal
    Public Property SoLuong() As Decimal
        Get
            Return _SoLuong
        End Get
        Set(ByVal value As Decimal)
            _SoLuong = value
        End Set
    End Property

    Private _DonGia As Decimal
    Public Property DonGia() As Decimal
        Get
            Return _DonGia
        End Get
        Set(ByVal value As Decimal)
            _DonGia = value
        End Set
    End Property

    Private _Tien As Decimal
    Public Property Tien() As Decimal
        Get
            Return _Tien
        End Get
        Set(ByVal value As Decimal)
            _Tien = value
        End Set
    End Property

    Private _TienTT As Decimal
    Public Property TienTT() As Decimal
        Get
            Return _TienTT
        End Get
        Set(ByVal value As Decimal)
            _TienTT = value
        End Set
    End Property

    Private _TiLeCK As Decimal
    Public Property TiLeCK() As Decimal
        Get
            Return _TiLeCK
        End Get
        Set(ByVal value As Decimal)
            _TiLeCK = value
        End Set
    End Property

    Private _TienCK As Decimal
    Public Property TienCK() As Decimal
        Get
            Return _TienCK
        End Get
        Set(ByVal value As Decimal)
            _TienCK = value
        End Set
    End Property

    Private _TileThue As Decimal
    Public Property TileThue() As Decimal
        Get
            Return _TileThue
        End Get
        Set(ByVal value As Decimal)
            _TileThue = value
        End Set
    End Property

    Private _TienThue As Decimal
    Public Property TienThue() As Decimal
        Get
            Return _TienThue
        End Get
        Set(ByVal value As Decimal)
            _TienThue = value
        End Set
    End Property

    Private _ThanhTien As Decimal
    Public Property ThanhTien() As Decimal
        Get
            Return _ThanhTien
        End Get
        Set(ByVal value As Decimal)
            _ThanhTien = value
        End Set
    End Property

    Private _MaSP As String
    Public Property MaSP() As String
        Get
            Return _MaSP
        End Get
        Set(ByVal value As String)
            _MaSP = value
        End Set
    End Property

    Private _TenSP As String
    Public Property TenSP() As String
        Get
            Return _TenSP
        End Get
        Set(ByVal value As String)
            _TenSP = value
        End Set
    End Property

End Class



Public Class cls_VT_HDNhap_ChiTiet

    Private _TenKho As String
    Public Property TenKho() As String
        Get
            Return _TenKho
        End Get
        Set(ByVal value As String)
            _TenKho = value
        End Set
    End Property

    Private _DVT As String
    Public Property DVT() As String
        Get
            Return _DVT
        End Get
        Set(ByVal value As String)
            _DVT = value
        End Set
    End Property

    Private _DonGia As Decimal?
    Public Property DonGia() As Decimal?
        Get
            Return _DonGia
        End Get
        Set(ByVal value As Decimal?)
            _DonGia = value
        End Set
    End Property

    Private _GiaVon As Decimal?
    Public Property GiaVon() As Decimal?
        Get
            Return _GiaVon
        End Get
        Set(ByVal value As Decimal?)
            _GiaVon = value
        End Set
    End Property

    Private _SoLuong As Decimal?
    Public Property SoLuong() As Decimal?
        Get
            Return _SoLuong
        End Get
        Set(ByVal value As Decimal?)
            _SoLuong = value
        End Set
    End Property

    Private _TienThanhToan As Decimal?
    Public Property TienThanhToan() As Decimal?
        Get
            Return _TienThanhToan
        End Get
        Set(ByVal value As Decimal?)
            _TienThanhToan = value
        End Set
    End Property

    Private _TienHang As Decimal?
    Public Property TienHang() As Decimal?
        Get
            Return _TienHang
        End Get
        Set(ByVal value As Decimal?)
            _TienHang = value
        End Set
    End Property

    Private _TienGiaVon As Decimal?
    Public Property TienGiaVon() As Decimal?
        Get
            Return _TienGiaVon
        End Get
        Set(ByVal value As Decimal?)
            _TienGiaVon = value
        End Set
    End Property

    Private _TiLeCK As Decimal?
    Public Property TiLeCK() As Decimal?
        Get
            Return _TiLeCK
        End Get
        Set(ByVal value As Decimal?)
            _TiLeCK = value
        End Set
    End Property

    Private _TienCK As Decimal?
    Public Property TienCK() As Decimal?
        Get
            Return _TienCK
        End Get
        Set(ByVal value As Decimal?)
            _TienCK = value
        End Set
    End Property

    Private _ThueSuat As Decimal?
    Public Property ThueSuat() As Decimal?
        Get
            Return _ThueSuat
        End Get
        Set(ByVal value As Decimal?)
            _ThueSuat = value
        End Set
    End Property

    Private _TienThue As Decimal?
    Public Property TienThue() As Decimal?
        Get
            Return _TienThue
        End Get
        Set(ByVal value As Decimal?)
            _TienThue = value
        End Set
    End Property

    Private _ThanhTien As Decimal?
    Public Property ThanhTien() As Decimal?
        Get
            Return _ThanhTien
        End Get
        Set(ByVal value As Decimal?)
            _ThanhTien = value
        End Set
    End Property

    Private _STT As Integer
    Public Property STT() As Integer
        Get
            Return _STT
        End Get
        Set(ByVal value As Integer)
            _STT = value
        End Set
    End Property

    Private _SoSeri As String
    Public Property SoSeri() As String
        Get
            Return _SoSeri
        End Get
        Set(ByVal value As String)
            _SoSeri = value
        End Set
    End Property

    Private _SoHDTC As String
    Public Property SoHDTC() As String
        Get
            Return _SoHDTC
        End Get
        Set(ByVal value As String)
            _SoHDTC = value
        End Set
    End Property

    Private _NgayHoaDon As Date?
    Public Property NgayHoaDon() As Date?
        Get
            Return _NgayHoaDon
        End Get
        Set(ByVal value As Date?)
            _NgayHoaDon = value
        End Set
    End Property

    Private _sNgayHoaDon As String
    Public Property sNgayHoaDon() As String
        Get
            Return _sNgayHoaDon
        End Get
        Set(ByVal value As String)
            _sNgayHoaDon = value
        End Set
    End Property

    Private _IsTruocThue As Boolean
    Public Property IsTruocThue() As Boolean
        Get
            Return _IsTruocThue
        End Get
        Set(ByVal value As Boolean)
            _IsTruocThue = value
        End Set
    End Property

    Private _ID As String
    Public Property ID() As String
        Get
            Return _ID
        End Get
        Set(ByVal value As String)
            _ID = value
        End Set
    End Property

    Private _IDVatTu As String
    Public Property IDVatTu() As String
        Get
            Return _IDVatTu
        End Get
        Set(ByVal value As String)
            _IDVatTu = value
        End Set
    End Property

    Private _IDHDNhap As String
    Public Property IDHDNhap() As String
        Get
            Return _IDHDNhap
        End Get
        Set(ByVal value As String)
            _IDHDNhap = value
        End Set
    End Property

    Private _IDKho As String
    Public Property IDKho() As String
        Get
            Return _IDKho
        End Get
        Set(ByVal value As String)
            _IDKho = value
        End Set
    End Property

    Private _MaKho As String
    Public Property MaKho() As String
        Get
            Return _MaKho
        End Get
        Set(ByVal value As String)
            _MaKho = value
        End Set
    End Property

    Private _MaVatTu As String
    Public Property MaVatTu() As String
        Get
            Return _MaVatTu
        End Get
        Set(ByVal value As String)
            _MaVatTu = value
        End Set
    End Property

    Private _TenVatTu As String
    Public Property TenVatTu() As String
        Get
            Return _TenVatTu
        End Get
        Set(ByVal value As String)
            _TenVatTu = value
        End Set
    End Property



    Private _DM_Kho As DM_Kho
    Public Property DM_Kho() As DM_Kho
        Get
            Return _DM_Kho
        End Get
        Set(ByVal value As DM_Kho)
            _DM_Kho = value
        End Set
    End Property
    '-------------------------------------------------------------
    'Su dung cho dieu chuyen noi bo
    Private _IDKhoTu As String
    Public Property IDKhoTu() As String
        Get
            Return _IDKhoTu
        End Get
        Set(ByVal value As String)
            _IDKhoTu = value
        End Set
    End Property

    Private _MaKhoTu As String
    Public Property MaKhoTu() As String
        Get
            Return _MaKhoTu
        End Get
        Set(ByVal value As String)
            _MaKhoTu = value
        End Set
    End Property

    Private _IDKhoDen As String
    Public Property IDKhoDen() As String
        Get
            Return _IDKhoDen
        End Get
        Set(ByVal value As String)
            _IDKhoDen = value
        End Set
    End Property

    Private _MaKhoDen As String
    Public Property MaKhoDen() As String
        Get
            Return _MaKhoDen
        End Get
        Set(ByVal value As String)
            _MaKhoDen = value
        End Set
    End Property

    Private _IDHDXuat_CT As String
    Public Property IDHDXuat_CT() As String
        Get
            Return _IDHDXuat_CT
        End Get
        Set(ByVal value As String)
            _IDHDXuat_CT = value
        End Set
    End Property

    Public Sub CopyTo_HDNhap_ChiTiet(ByRef obj As VT_HDNhap_ChiTiet)
        With obj
            .TiLeCK = obj.TiLeCK.GetValueOrDefault
            .DonGia = Me.DonGia
            .SoLuong = Me.SoLuong
            .TienHang = Me.TienHang
            .TiLeCK = Me.TiLeCK
            .TienCK = Me.TienCK
            .TienCK = Me.TienCK
            .ThueSuat = Me.ThueSuat
            .TienThue = Me.TienThue
            .ThanhTien = Me.ThanhTien
            .TienThanhToan = Me.TienThanhToan
            .GiaVon = Me.GiaVon
            .TienGiaVon = Me.TienGiaVon
            .IDVatTu = Me.IDVatTu
            .IDKho = Me.IDKho
            .IsTruocThue = Me.IsTruocThue
            '---------------------------------------
            .STT = Me.STT
            .SoSeri = Me.SoSeri
            .SoHDTC = Me.SoHDTC
            .NgayHoaDon = Me.NgayHoaDon
            If Me.sNgayHoaDon IsNot Nothing AndAlso Me.sNgayHoaDon.Contains("/") Then
                Dim arr = Me.sNgayHoaDon.Split("/")
                Dim ngay = DateSerial(CInt(arr(2)), CInt(arr(1)), CInt(arr(0)))
                .NgayHoaDon = ngay
            Else
                .NgayHoaDon = Me.NgayHoaDon
            End If
            .InUsed = True
            .EditedOn = dbTV.GetDateTimeServer

        End With
    End Sub

End Class